<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>我的</title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/base.css" />
		<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
		<script src="js/flexible.js"></script>
		<link rel="stylesheet" href="css/wodezhanghu.css" />
		<script src="js/jquery-3.1.1.js"></script>
		<script src="js/iconfont.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="js/confi.js"></script>
	</head>

	<body>
		 <div class="heard">
		 	<h4>我的</h4>
		 	<ul class="myInfo">
		 		<li>
		 			<img id="userImg" src="image/icon/icon_tx@2x.png" alt="" />
		 			<div>
		 				<p id="userNa"></p>
		 				<p id="phone"></p>
		 			</div>
		 		</li>
		 		<li>
		 			<div>
		 				<p style="font-size: 0.3rem;">账户余额</p>
		 			    <p id="coin" style="font-size: 0.53rem;"></p>
		 			</div>
		 		</li>
		 	</ul>
		 	<ul class="buy">
		 		<li>
		 			<p>今日收入</p>
		 			<span id="income"></span>
		 			<a href="recharge.html"><button>充值</button></a>
		 		</li>
		 		<li>
		 			<p>累计收益</p>
		 			<span id="allIncome"></span>
		 			<a href="withdraw-cash.html"><button>提现</button></a>
		 		</li>
		 	</ul>
		 </div>
		 <div class="mui-content">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell tubiao" id="xgnc">
					<span><img src="image/icon/icon_my@2x.png" style="width: 0.8rem;height: 0.70rem;" /></span>
					<a href="personalData.html" class="mui-navigate-right">
						个人资料
					</a>
				</li>
				<li class="mui-table-view-cell tubiao" id="hbjl">
					<span><img src="image/icon/icon_hbjl@2x.png" style="width: 0.64rem;height: 0.8rem;" /></span>
					<a href="redRecords.html" class="mui-navigate-right">
						红包记录
					</a>
				</li>
				<li class="mui-table-view-cell tubiao" id="zjjl">
					<span><img src="image/icon/icon_zjjl@2x.png" style="width: 0.8rem;height: 0.74rem;" /></span>
					<a href="capital-record.html" class="mui-navigate-right">
						资金记录
					</a>
				</li>
				<li class="mui-table-view-cell tubiao" id="srjl">
					<span><img src="image/icon/icon_shr@2x.png" style="width: 0.8rem;height: 0.8rem;" /></span>
					<a href="revenue-records.html" class="mui-navigate-right">
						收入记录
					</a>
				</li>
				<li class="mui-table-view-cell tubiao" id="yqxj">
					<span><img src="image/icon/icon_yq@2x.png" style="width: 0.74rem;height: 0.74rem;" /></span>
					<a href="invitations.html" class="mui-navigate-right">
						邀请下级
					</a>
				</li>
				<li class="mui-table-view-cell tubiao" id="wdsl">
					<span><img src="image/icon/icon_dl@2x.png" style="width: 0.8rem;height: 0.8rem;" /></span>
					<a href="my-agent.html" class="mui-navigate-right">
						我的代理
					</a>
				</li>
				<li class="mui-table-view-cell tubiao" id="lxkf">
					<span><img src="image/icon/icon_kf@2x.png" style="width: 0.7rem;height: 0.74rem;" /></span>
					<a href="service.html" class="mui-navigate-right">
						联系客服
					</a>
				</li>
			</ul>
		</div>
		<!--
    	作者：18291958857@163.com
    	时间：2019-01-05
    	描述：底部切换
    -->
		 <nav class="mui-bar mui-bar-tab">
			<a class="tab-buttom" href="index.html">
				<span class="mui-icon iconfont icon-moban"></span>
				<span class="mui-tab-label">群组</span>
			</a>
			<a class="tab-buttom" href="mailList.html">
				<span class="mui-icon iconfont icon-tongxunlu"></span>
				<span class="mui-tab-label">通讯录</span>
			</a>
			<a class="tab-buttom mui-active" href="my.html">
				<span class="mui-icon iconfont icon-wodexuanzhong"></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav> 
		<script type="text/javascript" charset="utf-8">
			//		我的账户
			var token = localStorage.getItem('token');
			mui.ajax(config.host + '/home/User/myAccount ', {
				headers: {
					'token': token
				},
				dataType: 'json', //服务器返回json格式数据
				type: 'get', //HTTP请求类型	              
				success: function(data) {
					if(data.code == 200) {
						var phone=data.data.user_phone;
						var phoneNum=phone.replace(phone.substr(3,4),"****");
//						$('#userImg').attr('src',data.user_headimg);
						$('#userNa').text(data.data.nickname);
						$('#phone').text(phoneNum);
						$('#coin').text(data.data.user_gold);
						$('#income').text(data.data.tody_income);
						$('#allIncome').text(data.data.all_income);
					} else {
						mui.toast(data.msg)
					}
				}
			});
			$("#dating").on('click', function() {
				location.href = 'youxidating.html'
			})
			$("#zhanghu").on('click', function() {
				location.href = 'wodezhanghu.html'
			})
			$("#xgnc").on('click', function() {
				location.href = 'xiugainicheng.html'
			})
			$("#hbjl").on('click', function() {
				location.href = 'youxijilu.html'
			})
			$("#czjl").on('click', function() {
				location.href = 'chongzhijilu.html'
			})
			$("#fhsy").on('click', function() {
				location.href = 'index.html'
			})
		</script>
	</body>

</html>